let couponid=getQueryString('couponid')
console.log(couponid)
let el="";
let uu=document.querySelector('.uu')

fetch('http://chst.vip:1234/api/getcouponproduct?couponid='+couponid)
.then(body=>body.json())
.then(res=>{
    console.log(res.result)
    res.result.forEach(item=>{
        el+=`
        <li data-index="0">
    <a href="javascript:;" class="clearfix">
        <div class="img fl">
        ${item.couponProductImg}
        </div>
        <div class="infoR">
            <div class="title">
                <h4>${item.couponProductName}</h4>
            </div>
            <div class="other">
                <h4 class="price">
                   ${item.couponProductPrice}
                </h4>
                <div class="mall fl">${item.couponProductTime}</div>
            </div>
        </div>
    </a>
</li>`

el2+=`${item.couponProductImg}`
    })
    uu.innerHTML=el;
    wrap.innerHTML=el2;
})

// 轮播图
var wrap=document.querySelector('.wrap')
var el2="";
var carousel=document.querySelector('.carousel');
//卷下来
uu.onclick=function(e){
    if(e.target.localName="li"){       
        carousel.style.transform="translateY(0px)";
    }
}
//卷上去
let det=document.querySelector('.quxiao');
det.onclick=function(){
    carousel.style.transform="translateY(-1000px)";
    carousel.style.transition="all .5s linear 0s"; 
}
$('.left').on('click',function(){
    $('wrap').css('transform','translateX(-200px)')
})